// FileInfoWidget.cpp : File Info Tree widget
// Copyright (C) 2013, drangon <drangon.zhou@gmail.com>
// 2013-09
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>

#include "FileInfoWidget.h"


FileInfoWidget::FileInfoWidget()
{
}

FileInfoWidget::~FileInfoWidget()
{

}

#if 0
void FileHexWidget::draw()
{
	draw_box();
	// draw_label();
	char buf[256];
	sprintf( buf, "fp %p", m_fp );
	// printf( "draw buf [%s], x/y %d %d \n", buf, x(), y() );
	fl_color( FL_RED );
	fl_draw( buf, x() + 20, y() + 20 );
	fl_line( x(), y(), x() + 50, y() + 50 );
}

int FileHexWidget::handle( int event )
{
	int ret = 0;
	if( event == FL_PUSH ) {
		if( Fl::event_button() == FL_RIGHT_MOUSE ) {
			printf( "do callback\n" );
			do_callback();
			ret = 1;
		}
	}
	return ret;
}

int FileHexWidget::SetFile( FILE * fp )
{
	m_fp = fp;
	redraw();
	return 0;
}
#endif 
